package com.acs.player.views.simple;

import java.util.List;

import com.acs.player.R;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class SimpleAdapter extends ArrayAdapter<String> {
	
	private List<String> playlistNameList;

	public SimpleAdapter(Context context, int resourceId, List<String> playlistNameList) {
		super(context, resourceId, playlistNameList);
		this.playlistNameList = playlistNameList;
	}
	
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {	
    	View view = convertView;
    	if (convertView == null) {
            LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            view = vi.inflate(R.layout.row, null); 
    	}
    	
    	String text = playlistNameList.get(position);
    	
		TextView textView = (TextView) view.findViewById(R.id.rowPlaylist);
		textView.setTextColor(Color.BLACK);
		textView.setTextScaleX(2);
    	textView.setText(text);
    	
		return view;	
    }

}
